package com.thor.palmmall.rest.order.converter;

import org.springframework.core.convert.converter.Converter;

import com.thor.palmmall.rest.order.AProductCategory;
import com.thor.palmmall.spi.order.SProductCategory;

public class SProductCategoryConverter implements Converter<AProductCategory,SProductCategory>{
	private static SProductCategoryConverter instance;
	public static SProductCategoryConverter getInstance() {
		if (instance == null)
			instance = new SProductCategoryConverter();
		return instance;
	}
	@Override
	public SProductCategory convert(AProductCategory source) {
		SProductCategory target = new SProductCategory();
		target.setUuid(source.getUuid());
		target.setCode(source.getCode());
		target.setName(source.getName());
		target.setLevelId(source.getLevelId());
		return target;
	}

}
